<template>
    <div ref="strends" style=" width: 105%; height: calc(100vh - 335px)"></div>
</template>
  
<script>
import * as echarts from 'echarts/core';
import { GridComponent } from 'echarts/components';
import { LineChart } from 'echarts/charts';
import { UniversalTransition } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers';

echarts.use([GridComponent, LineChart, CanvasRenderer, UniversalTransition]);
export default {
    mounted() {
        this.drawcontinuous();
    },
    methods: {
        drawcontinuous() {
            var chartDom = this.$refs.strends;
            var myChart = echarts.init(chartDom);
            var option;

            // const data = res.data;
            const dateList = ['第一季度', '第二季度', '第三季度', "第四季度"];
            const valueList = [200, 300, 380, 120];
            option = {
              title: {
                text: "季度总收入",
              },
                
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    data: dateList
                },
                yAxis: {
                    type: 'value'
                },
                series: [
                    {
                        data: valueList,
                        type: 'line',
                        areaStyle: {}
                    }
                ]
            };

            myChart.setOption(option);
        },
    },
};
</script>
  
<style></style>